package org.dinner.order.service.impl;

import java.util.List;

import org.dinner.order.dao.ItemDishDAO;
import org.dinner.order.model.ItemDish;
import org.dinner.order.service.ItemDishService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class ItemDishServiceImpl implements ItemDishService {

	@Autowired
	private ItemDishDAO itemDishDAO;
	
	@Transactional
	public ItemDish add(ItemDish item) {
		return itemDishDAO.add(item);
	}

	@Transactional
	public List<ItemDish> list() {
		return itemDishDAO.list();
	}

	@Transactional
	public ItemDish getById(int id) {
		return itemDishDAO.getById(id);
	}

	@Transactional
	public void remove(int id) {
		itemDishDAO.remove(id);
	}

}
